Skip to content

Add Antigravity as a usage source - #21

Open
nuchareviews-beep wants to merge 1 commit into
MayankBansal12:mainfrom
nuchareviews-beep:add-omniroute-antigravity-collectors
Open

Add Antigravity as a usage source#21
nuchareviews-beep wants to merge 1 commit into
MayankBansal12:mainfrom
nuchareviews-beep:add-omniroute-antigravity-collectors

Conversation

@nuchareviews-beep

Copy link
Copy Markdown

Summary

  • Adds Antigravity as a new usage source, alongside Codex, Claude Code, FX, Grok Agent, OpenCode, Pi, and Prime Agent.
  • Antigravity is bridged into BB by a companion plugin (bb-plugin-antigravity-acp) that shells out to the local agy CLI per turn. agy has no session log of its own in a stable, parseable shape, so that bridge writes one JSONL line per turn to ~/.antigravity-acp/usage.jsonl, in the same kind: "generation" / fact shape this plugin already reads for FX — so this change reuses that existing parsing path (matches(), the inline host-scan branch, parseHostUsageAggregates) rather than introducing a new file format or a new top-level collector function.
  • Threaded "antigravity" through AgentId, HostJsonAgentId, jsonAgentRoots, the AGENTS list, and the host-json-collector's file matcher + inline parser.

Why not push data in directly from a plugin?

I looked for an ingestion API (RPC/HTTP route) this plugin exposes for other plugins to report usage into, and didn't find one — it's read-only, parsing local logs itself. Adding a new local-log source felt more in keeping with the existing architecture than adding a new ingestion surface, so that's the shape this PR takes. Happy to go a different direction if you'd rather have an ingestion API instead.

Test plan

  • npm test — all 67 tests pass (64 pre-existing + 3 new: a collectors.test.ts case, a host-json-collector.test.ts case, and a jsonAgentRoots case in server.test.ts)
  • npx tsc --noEmit — clean
  • Verified against a real log line produced by a live bb-plugin-antigravity-acp turn (not just synthetic fixtures) — confirmed it parses into a correct usage row before opening this PR

🤖 Generated with Claude Code

bb-plugin-antigravity-acp bridges BB to the local `agy` CLI, but agy has
no session log of its own in a stable, parseable shape - the bridge is
the source of truth, writing one JSONL line per turn to
~/.antigravity-acp/usage.jsonl in the same generation-fact shape this
plugin already reads for FX, so the new source reuses that parsing path
rather than inventing a second file format.

Verified against a real log line produced by a live provider-bridge
turn, not just synthetic fixtures.
@MayankBansal12

Copy link
Copy Markdown
Owner

hey @nuchareviews-beep, thanks for raising the PR, will take a look and get it merged today!

@MayankBansal12

MayankBansal12 commented Aug 22, 2026

Copy link
Copy Markdown
Owner

opencode agent on behalf of mayank

Thanks for this — the approach of reusing the existing FX generation/fact JSONL parsing path is a good fit, and the wiring through AgentId, jsonAgentRoots, and the collector matcher looks clean.

One thing needs fixing before this can merge: syncAll in server.ts only runs collectors via explicit syncJsonAgent(...) calls (see lines ~580–587), and there's no call for "antigravity". As it stands, the AGENTS entry will show the filter option in the UI, but no sync will ever run for it — no usage rows and no sync-state row will be created. The new tests pass because they invoke scan() directly, which skips syncAll.

Please add a syncJsonAgent(bb, db, machine, home, "antigravity", collectorSettings, ...) call alongside the others in that Promise.all, plus a test that exercises it through syncAll. Happy to re-review after.

@MayankBansal12

Copy link
Copy Markdown
Owner

@nuchareviews-beep i don't use antigravity so couldn't verify the usage stats...please ensure you have tested on your end and if possible please attach a screenshot in PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants